import os


def writePid(pidfile):
    pid = str(os.getpid())
    f = open(pidfile, 'w')
    f.write(pid)
    f.close()